@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="VedioInfoForm">

            <input type="hidden" id="id" value="${vedioDetail.id}">

            <div class="row">
                <div class="col-sm-6">

                    <#input id="vedioName" name="标题" underline="true" value="${vedioDetail.name}"/>

                    <#cateModalUp id="cateList" name="所属专辑" readonly="readonly" underline="true" type="button" value="${vedioDetail.cateNames}"/>

                    <#file id="filePath" name="播放地址" underline="true" value="${vedioDetail.filePath}"/>

                    <!--<#input id="duration" name="时长" underline="true" />-->

                    <#input id="playCount" name="播放量" underline="true" value="${vedioDetail.playCount}"/>

                    <#input id="downloadCount" name="下载量" underline="true" value="${vedioDetail.downloadCount}"/>

                    <#input id="recRate" name="推荐排序值" underline="true" value="${vedioDetail.recRate}"/>

                </div>
                <div class="col-sm-6">
                    <#file id="logoPath" name="标题图片" underline="true" value="${vedioDetail.logoPath}"/>

                    <#ageModalUp id="ageType" name="年龄段" readonly="readonly" underline="true" type="button" value="${vedioDetail.ageTypeNames}"/>

                    <#input id="downloadAdd" name="下载地址" underline="true" value="${vedioDetail.filePath}"/>

                    <#input id="rating" name="推荐指数" underline="true" value="${vedioDetail.rating}"/>

                    <#input id="shareCount" name="分享量" underline="true" value="${vedioDetail.shareCount}"/>

                    <!--<#input id="orderNum" name="集数" underline="true" value="${vedioDetail.orderNum}"/>-->
                </div>
            </div>

            <div id="logo-parent">
                <div id="logo-bar"></div>
            </div>

            <div id="file-parent">
                <div id="file-bar"></div>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="VedioInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="VedioInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<div class="modal inmodal fade" id="ageModalUp" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
                        class="sr-only">Close</span>
                </button>
                <p class="modal-title">年龄选择</p>
            </div>
            <small class="font-bold">
                <div class="modal-body">
                    @var flag = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                        @if(ageType == -1) {
                        <input class="ages" name="age_name" value="-1" age-name="全部适用" type="checkbox" checked="checked"/>全部适用&nbsp;&nbsp;&nbsp;&nbsp;
                        @flag = true;
                        @} else {
                            @continue;
                        @}
                    @}
                    @}
                    @if(!flag) {
                    <input class="ages" name="age_name" value="-1" age-name="全部适用" type="checkbox"/>全部适用&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag1 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                        @if(ageType == 0) {
                        <input class="ages" name="age_name" value="0" age-name="胎教" type="checkbox" checked="checked"/>胎教&nbsp;&nbsp;&nbsp;&nbsp;
                        @flag1 = true;
                        @} else {
                            @continue;
                        @}
                    @}
                    @}
                    @if(!flag1) {
                    <input class="ages" name="age_name" value="0" age-name="胎教" type="checkbox"/>胎教&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag2 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                        @if(ageType == 1) {
                        <input class="ages" name="age_name" value="1" age-name="0-1岁" type="checkbox" checked="checked"/>0-1岁&nbsp;&nbsp;&nbsp;&nbsp;
                        @flag2 = true;
                        @} else {
                            @continue;
                        @}
                    @}
                    @}
                    @if(!flag2) {
                    <input class="ages" name="age_name" value="1" age-name="0-1岁" type="checkbox"/>0-1岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag3 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                        @if(ageType == 2) {
                        <input class="ages" name="age_name" value="2" age-name="1-3岁" type="checkbox" checked="checked"/>1-3岁&nbsp;&nbsp;&nbsp;&nbsp;
                        @flag3 = true;
                        @} else {
                            @continue;
                        @}
                    @}
                    @}
                    @if(!flag3) {
                    <input class="ages" name="age_name" value="2" age-name="1-3岁" type="checkbox"/>1-3岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag4 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                    @if(ageType == 3) {
                    <input class="ages" name="age_name" value="3" age-name="3-5岁" type="checkbox" checked="checked"/>3-5岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @flag4 = true;
                    @} else {
                    @continue;
                    @}
                    @}
                    @}
                    @if(!flag4) {
                    <input class="ages" name="age_name" value="3" age-name="3-5岁" type="checkbox"/>3-5岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag5 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                    @if(ageType == 4) {
                    <input class="ages" name="age_name" value="4" age-name="5-7岁" type="checkbox" checked="checked"/>5-7岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @flag5 = true;
                    @} else {
                    @continue;
                    @}
                    @}
                    @}
                    @if(!flag5) {
                    <input class="ages" name="age_name" value="4" age-name="5-7岁" type="checkbox"/>5-7岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @}

                    @var flag6 = false;
                    @if(vedioDetail.ageTypeIdList != null) {
                    @for(ageType in vedioDetail.ageTypeIdList) {
                    @if(ageType == 5) {
                    <input class="ages" name="age_name" value="5" age-name="7-12岁" type="checkbox" checked="checked"/>7-12岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @flag6 = true;
                    @} else {
                    @continue;
                    @}
                    @}
                    @}
                    @if(!flag6) {
                    <input class="ages" name="age_name" value="5" age-name="7-12岁" type="checkbox"/>7-12岁&nbsp;&nbsp;&nbsp;&nbsp;
                    @}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="VedioInfoDlg.getAgeTypesUp()">确定</button>
                </div>
            </small>
        </div>
        <small class="font-bold">
        </small>
    </div>
    <small class="font-bold">
    </small>
</div>
<div class="modal inmodal fade" id="cateModalUp" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
                        class="sr-only">Close</span>
                </button>
                <p class="modal-title">专辑选择</p>
            </div>
            <small class="font-bold">
                <div class="modal-body">
                    <#SelectCon id="bannerSelecter" name="栏目" >
                        <option value="0" selected="selected">无</option>
                        @for(banner in bannerList) {
                        <option value="${banner.id}">${banner.name}</option>
                        @}
                    </#SelectCon>
                </div>
                <div class="modal-body" id="cates">
                    @for(category in vedioDetail.cateList) {
                        @if(category.checked == 'true') {
                            <input class="categroys" name="cate_name" value="${category.id}" cate-name="${category.name}" type="checkbox" checked="checked"/>${category.name}&nbsp;&nbsp;&nbsp;&nbsp;
                        @}
                        @if(category.checked == 'false') {
                            <input class="categroys" name="cate_name" value="${category.id}" cate-name="${category.name}" type="checkbox"/>${category.name}&nbsp;&nbsp;&nbsp;&nbsp;
                        @}
                    @}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="VedioInfoDlg.getCatesUp()">确定</button>
                </div>
            </small>
        </div>
        <small class="font-bold">
        </small>
    </div>
    <small class="font-bold">
    </small>
</div>
<script src="${ctxPath}/static/modular/app/vedio/radio/vedio_info.js"></script>
@}

